package cn.topcode.unicorn.wxsdk.account;

import cn.topcode.unicorn.utils.http.HttpUtil;
import cn.topcode.unicorn.wxsdk.WXContext;
import cn.topcode.unicorn.wxsdk.account.dto.CreateTicketResult;
import cn.topcode.unicorn.wxsdk.account.dto.ReqCreateTicket;
import cn.topcode.unicorn.wxsdk.account.dto.ReqShortUrl;
import cn.topcode.unicorn.wxsdk.account.dto.ShortUrlResult;
import cn.topcode.unicorn.wxsdk.base.ApiUrl;
import java.io.InputStream;

/**
 * Created by Unicorn on 2017/12/3.
 */
public class AccountInvokerImpl implements AccountInvoker {

    @Override
    public CreateTicketResult createTicket(ReqCreateTicket req) {
        String token = WXContext.getToken();
        String url = String.format(ApiUrl.Account.CREATE_TICKET, token);
        return HttpUtil.post(req, CreateTicketResult.class, url);
    }

    @Override
    public InputStream getQrcodeByTicket(String ticket) {
        return null;
    }

    @Override
    public ShortUrlResult shorturl(ReqShortUrl req) {
        return null;
    }
}
